HTMLify

style.css
Views: 27 | Author: cody
@import url("https://fonts.googleapis.com/css?family=Open+Sans");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-image: linear-gradient(-45deg, #151515 0%, #222222 100%);
  background-repeat: no-repeat;
  height: 100vh;
}

ul {
  height: 100%;
}

li {
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 25%;
  height: 50%;
  float: left;
}

h4 {
  position: absolute;
  left: 50%;
  bottom: 8vh;
  transform: translate(-50%, 0);
  text-align: center;
  margin-top: 40px;
  color: #fff;
  font-family: "Open Sans", sans-serif;
}

@media screen and (max-width: 767px) {
  li {
    width: 50%;
  }
}

@media screen and (max-width: 567px) {
  li {
    width: 100%;
  }
}

span {
  border-radius: 4px;
  display: block;
}

/*** Easing ***/
#easing {
  overflow: hidden;
  width: 200px;
}

#easing span {
  width: 80px;
  height: 80px;
  background: #fff;
  animation: easing 2s ease-out infinite;
}

@keyframes easing {
  0% {
    transform: translateX(-120px);
  }

  75% {
    transform: translateX(40px);
  }

  100% {
    transform: translateX(250px);
  }
}

/*** Parenting ***/
#parenting span {
  width: 100px;
  height: 40px;
  background: #fff;
  margin: 10px 0;
  animation: slide 1s ease-in-out infinite alternate;
}

@keyframes slide {
  0% {
    transform: translateX(-50px);
  }

  100% {
    transform: translateX(50px);
  }
}

#parenting span:first-child {
  transform-origin: 50% 100%;
  animation: growShrink 1s ease-in-out infinite alternate;
}

@keyframes growShrink {
  0% {
    transform: translateX(-50px) scale(0.1);
  }

  100% {
    transform: translateX(50px) scale(1);
  }
}

/*** Obscuration ***/
#obscuration {
  width: 60px;
  height: 80px;
  background: #fff;
  border-radius: 4px;
  position: relative;
}

#obscuration span {
  opacity: 0.7;
  width: 90px;
  height: 110px;
  background: #f7f7f7;
  position: absolute;
  top: 50%;
  left: -60px;
  transform: translate(0, -50%);
  animation: obscure 1s cubic-bezier(0.6, 0, 0.4, 1) infinite alternate;
}

@keyframes obscure {
  100% {
    left: 30px;
  }
}

/*** Dolly & Zoom ***/
#dollyZoom {
  width: 65px;
  height: 65px;
  background: transparent;
  overflow: hidden;
  border-radius: 4px;
  position: relative;
}

#dollyZoom ul {
  width: 150px;
  height: 150px;
  background: transparent;
  overflow: hidden;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: scale(1) translate(-50%, -50%);
  transform-origin: 118% 103%;
  animation: zoom 2s ease-in-out infinite alternate;
}

@keyframes zoom {
  100% {
    transform-origin: center center;
    transform: scale(0.412) translate(-120%, -122%);
  }
}

#dollyZoom li {
  background: #fff;
  border-radius: 0;
  width: 40px;
  height: 40px;
  margin-right: 15px;
}

#dollyZoom li:nth-child(3n) {
  margin-right: 0;
}

#dollyZoom li:nth-child(4),
#dollyZoom li:nth-child(5),
#dollyZoom li:nth-child(6),
#dollyZoom li:nth-child(7),
#dollyZoom li:nth-child(8),
#dollyZoom li:nth-child(9) {
  margin-top: 15px;
}

/*** Transformation ***/
#transformation {
  width: 60px;
  height: 60px;
  background: #fff;
  border-radius: 50%;
  animation: transform 1s ease-in-out infinite alternate;
}

@keyframes transform {
  100% {
    width: 150px;
    border-radius: 4px;
  }
}

/*** Masking ***/
#masking {
  width: 150px;
  height: 60px;
  background: #eaeaea;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 4px;
  overflow: hidden;
}

#masking span {
  width: 30px;
  height: 30px;
  background: #fff;
  border-radius: 50%;
  animation: fill 1s ease-in-out infinite alternate;
}

@keyframes fill {
  100% {
    width: 250px;
    height: 250px;
    border-radius: 50%;
  }
}

/*** Parallax ***/
#parallax {
  width: 160px;
  height: 90px;
  background: #eaeaea;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 4px;
}

#parallax span {
  width: 120px;
  height: 90px;
  background: #fff;
  animation: parallax 1s ease-in-out infinite alternate;
}

@keyframes parallax {
  0% {
    transform: translateY(-20px);
  }

  100% {
    transform: translateY(20px);
  }
}

/*** Dimensionality ***/
li:nth-child(5) {
  perspective: 400px;
}

#dimension {
  width: 190px;
  height: 60px;
  background: #fff;
  border-radius: 4px;
  animation: dimension 1s ease-in-out infinite alternate;
}

@keyframes dimension {
  100% {
    transform: rotateX(-90deg);
  }
}

Comments